//
// Created by Administrator on 2024-1-26.
//

#ifndef WAYCPP_FRACTION_H
#define WAYCPP_FRACTION_H


class Fraction {
private:
    int num,den;
public:
    // 内联函数，不可递归或者太长
    void set(int n,int d){
        num = n;
        den = d;
    }
    int get_num(){
        return num;
    }
    int get_den(){
        return den;
    }
private:
    void normalize();
    int gcf(int a,int b);
    int lcm(int a,int b);
};


#endif //WAYCPP_FRACTION_H
